package com.fl.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fl.model.TStudy;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;


@Service	
public class StudyService extends BaseService{
	
	@Autowired
	public com.fl.mapper.TStudyMapper TStudyMapper=null;
	
	
	public List<TStudy> getAll()
	{
		return this.TStudyMapper.selectAll();
	}
	
	public PageInfo<TStudy> getPageInfo(int pagenum,int pagesize)
	{
		
		PageHelper.startPage(pagenum, pagesize);
		List<TStudy> list=this.TStudyMapper.selectAll();
		PageInfo<TStudy> pageInfo = new PageInfo<>(list);
		return pageInfo;
	}
	public PageInfo<TStudy> getPageInfo(int pagenum,int pagesize,String fdatestart,String fdateend)
	{
		
		PageHelper.startPage(pagenum, pagesize);
		List<TStudy> list=this.TStudyMapper.queryByCondition( fdatestart, fdateend);
		PageInfo<TStudy> pageInfo = new PageInfo<>(list);
		return pageInfo;
	}
}
